<form class="form-horizontal form-validate" action="{php echo web_url('area/areaagent/agentImport')}" method="post" enctype="multipart/form-data">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h4 class="modal-title">一键导入代理</h4>
            </div>
            <div class="modal-body">
                <div class="alert alert-warning">
                    一键导入代理可以按全国省、市、区县地区，自动生成所有代理，默认按市级导入，已存在的地区将不会导入。导入的代理登陆密码为12345678，到期时间统一为当前时间加上一年。
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label must">导入类型</label>
                    <div class="col-sm-9">
                        <label class="radio-inline">
                            <input type="radio" value="1" name="districtslevel">按省级
                        </label>
                        <label class="radio-inline">
                            <input type="radio" value="2" name="districtslevel" checked>按市级
                        </label>
                        <label class="radio-inline">
                            <input type="radio" value="3" name="districtslevel">按区县
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">代理分组</label>
                    <div class="col-sm-9">
                        <select name="groupid" class="form-control">
                            {loop $allgroup $groups}
                            <option value="{$groups['id']}">{$groups['name']}</option>
                            {/loop}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">到期时间</label>
                    <div class="col-sm-9">
                        {php echo tpl_form_field_date('estimatetime',date('Y-m-d H:i:s',time()+365*86400),true);}
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-primary" type="submit">提交</button>
                <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
            </div>
        </div>
    </div>
</form>